package com.ehcontrerasg.agenda;

import android.support.v7.app.ActionBarActivity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class AyudaActivity extends ActionBarActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_ayuda);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.ayuda, menu);
		return true;
	}
	
	 @SuppressWarnings("deprecation")
		@Override
		public boolean onOptionsItemSelected(MenuItem item) {
			// TODO Auto-generated method stub
			AlertDialog alerta = new AlertDialog.Builder(this).create();
			alerta.setTitle(getString(R.string.ADTitulo));
			alerta.setButton("ok", new DialogInterface.OnClickListener() {
				
				@Override
				public void onClick(DialogInterface dialog, int which) {
					// TODO Auto-generated method stub
					
				}
			});
			 switch (item.getItemId()) {
			case R.id.MenAcerca:
				alerta.setMessage(getString(R.string.MenuAcerca));
				break;

			case R.id.MenAyuda:
				alerta.setMessage(getString(R.string.MenuAyuda));
				
				break;
				
			case R.id.MenWeb:
				alerta.setMessage(getString(R.string.MenuWeb));
				break;
			}
			alerta.show();
			return false;
		}

}
